home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / t_os / shell / igo / gosource / mdssave.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-16  |  1.5 KB  |  72 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <winb.h>
  5. #include <te.h>
  6. #include <fntb.h>
  7. #include <gui.h>
  8. #include "igo.h"
  9. #include "banx.h"
  10. #include "kiffile.h"
  11. #include "title.h"
  12.  
  13. extern int    deskTopId ;
  14. extern int    warningId ;
  15.  
  16. int    samesave_dialogId = -1 ;
  17. int    samesave_btnId[2] = -1 ;
  18.  
  19. /*    initDataMISSAVE:samesave_btnId[0]:MJ_DBUTTONL40の呼び出し関数    */
  20. int    igo_samesave_set(kobj, messId, argc, pev, trigger)
  21. int        kobj ;
  22. int        messId ;
  23. int        argc ;
  24. EVENT    *pev ;
  25. int        trigger ;
  26. {
  27. char *filename;
  28.     /*    オブジェクトを消す        */
  29.     MMI_SendMessage( samesave_dialogId , MM_ERASE , 0 ) ;
  30.  
  31.     /*    オブジェクトをダイアログから取り外す    */
  32.     MMI_SendMessage( samesave_dialogId , MM_DETACH , 0 ) ;
  33.  
  34.     retunrInitMenuFunc();
  35.  
  36.     filename = title_fname_read();
  37.     if(kifu_write(filename) != 0){
  38.         
  39.         /*    オブジェクトをダイアログに取り付ける    */
  40.         MMI_SendMessage( warningId , MM_ATTACH , 1 , deskTopId ) ;
  41.  
  42.         /*    warningIdで示されるオブジェクトを表示する    */
  43.         MMI_SendMessage( warningId , MM_SHOW , 0 ) ; 
  44.             
  45.         return NOERR;
  46.     }
  47.  
  48.     title_fsave_off();
  49.  
  50.     return NOERR ;
  51. }
  52.  
  53. /*    initDataMISSAVE:samesave_btnId[1]:MJ_DBUTTONL40の呼び出し関数    */
  54. int    igo_savesave_cancel(kobj, messId, argc, pev, trigger)
  55. int        kobj ;
  56. int        messId ;
  57. int        argc ;
  58. EVENT    *pev ;
  59. int        trigger ;
  60. {
  61.     /*    オブジェクトを消す        */
  62.     MMI_SendMessage( samesave_dialogId , MM_ERASE , 0 ) ;
  63.  
  64.     /*    オブジェクトをダイアログから取り外す    */
  65.     MMI_SendMessage( samesave_dialogId , MM_DETACH , 0 ) ;
  66.  
  67.     retunrInitMenuFunc();
  68.  
  69.     return NOERR ;
  70. }
  71.  
  72.